package com.moorecat.app;

import android.app.Activity;
import android.os.Bundle;
import android.view.Window;
import android.webkit.WebView;
import android.widget.TextView;

import com.moorecat.R;

/**
 * 更多 -> 帮助/服务条款
 * @author Minglong.Yu
 * @version 1.0 
 * @created Jun 22, 2011 12:03:11 PM
 */
public class MoreInfomation extends Activity {
	TextView textView;
	WebView webView;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.more_infomation);

		textView = (TextView) findViewById(R.id.more_infomation_title);
		webView = (WebView) findViewById(R.id.more_infomation);
		
		webView.getSettings().setJavaScriptEnabled(false);
		webView.setBackgroundColor(0);
		String type = getIntent().getStringExtra("type");
		if("help".equals(type)){
			textView.setText(R.string.help);
			String url = "file:///android_asset/more/more_help.html";
			webView.loadUrl(url);
		}else if("serviceTerms".equals(type)){
			textView.setText(R.string.service_terms);
			String url = "file:///android_asset/more/more_service_terms.html";
			webView.loadUrl(url);
		}
	}
}
